import { Component, OnInit, ViewChild } from '@angular/core';
import { UiService } from '../ui.service';
import { GB } from '../../environments/environment';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import { I18nService } from 'src/app/core/i18n/i18n.service';
import { ActionSheetConfig, SkinType, ActionSheetComponent, ActionSheetService } from 'ngx-weui';
import { MessageService } from '../core/message.service';

@Component({
  selector: 'app-index',
  templateUrl: './index.component.html',
  styleUrls: ['./index.component.less']
})
export class IndexComponent implements OnInit {

  @ViewChild('ios', { static: true }) iosAS: ActionSheetComponent;
  @ViewChild('android', { static: true }) androidAS: ActionSheetComponent;
  @ViewChild('auto', { static: true }) autoAS: ActionSheetComponent;
  active;
  menus: any[] = [{ text: ' English', value: 'en', other: 1 }, { text: '中文', value: 'zh' }, { text: 'わご', value: 'jp' }];
  config: ActionSheetConfig = {
    title: 'Language changes',
  } as ActionSheetConfig;

  gb=GB;

  constructor(
    private uiServuce: UiService,
    private i: I18nService,
    private srv: ActionSheetService,
    private message: MessageService
    ) {
      this.message.getMessage().subscribe(res=>{
        this.active = res.text;
      });
    }

  ngOnInit() {
    
  }

}
